import React from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import Home from '../container/sHomeContainer';
import NewsDetailsContainer from '../container/NewsDetailsContainer';
import NewsContainer from '../container/sNewsContainer';
import CommentsContainer from '../container/sCommentsContainer';
export default () => (
  <BrowserRouter>
    <Switch>
      <Route path="/" exact render={props => <Home {...props} />} />
      <Route path="/home" exact render={props => <Home {...props} />} />
      <Route
        path="/newsDetail/:id"
        exact
        render={props => <NewsDetailsContainer {...props} />}
      />
      <Route
        path="/news/:id"
        exact
        render={props => <NewsContainer {...props} />}
      />
      <Route
        path="/comments/:id"
        exact
        render={props => <CommentsContainer {...props} />}
      />
      {/*<Route path="/login" exact render={props => <Login {...props}/>}></Route>*/}
      {/*<Route path="/" exact render={() => <Home/>}></Route>*/}
      {/*<Route path="/home" component={Home}></Route>*/}
    </Switch>
  </BrowserRouter>
);
